Some fixes for hiding elements