Corrected one bug: comparing history with previous month