fix end status bug