fix nested dialog behaviour in jQuery UI