Removed bug in the flow