bugfixes and scaling changes