Fix open and close view