fixed sort error and when the start and end months are equal