bugfixes
final bugfixes i think