Fix handler leak and service stop command