fix end of case