Moved Open and Close event firing to beginning of open and close