Fix layout hide event invocation