fixed very minor bug in lastNMonth function
last N months issue