Fixing some bugs!