Bugfix, cleaning up