Improved implementation for Open and OpenAndHide actions

I should have done that from the very beginning... :)