Fixed crash when opening menu