fixing wrong automatic end month