Fix bug when closing the Model structure tab

(closes #50)