Fixing stupid code