fix incorrent ending