Made cleanup script work properly