minor bugfix for null on cleanup