cleanup.js breaking fix added, kind of hacky