Fixed window layering bug