fix deadlock advised by flowly