Fixed layering bug