cleanup of manage flow