bugfix, cleanup