Fixing some code