Minor fixed to prevent crash on exit
bugfixing WIP