Fixed menu flickering bug (not 100% sure it's fixed for good)

This commit may have fixed the flickering bug. It should be tested
thoroughly to make sure it still works before demoing it, as it may cause
some other unintentional bugs. It should also be tested to see if it even
did anything.