bug with cleanup fix