Revert previous patch until I get a bug fixed