sabi bugfixes, general engine bugfixes