Added support for when, when1. Fixed react1 bug