Fixed problem where dispose was not being called on the options dialog