Fix # 336 Save controls state after dropping main.

Fix # 336 Save controls state after dropping main.
fix