fix maintenance script (thought this was in last commit)