Bugfixes and error handling for MysticCore