Handling case of Close being called before Open