Setting invalid flow vectors to zero in every frame, and few other
changes.