cleanup and bugfux