Fix logic bugs causing 'updateQuota' to be called following 'cleanup'