Fix impossibility of closing after clicking at the opening