correct jquery bug and monthly total computation