Added error code 0 on successful quit