small cleanup + bugfix