Awesome bugfixes by Mikk36