Fixed crash when opening elmag module gui