Trying to fix bugs with cocoa dialog