Fixing some code that got removed somehow