fixed view switching bug with saved event callbacks