Fix logic for improvement continutaion step