bugfixes everywhere