fix oninvalid event support + add test
improvr on/off/fire methods