fixed bug with OnHide/OnShow with non declarative components
update unitTests