Fixing some code that I reverted