Fixes #5052: Correct correctButtons function