Fixed crash when opening the controls menu