Fix event trigger + function visibilities