Fixed bug if no cleanup is given