quit works as expected