improved quit behaviour
fixed quit from menu