Fix on eventHandler and flowInitEnvironment