Bug fixes for implicit-flow