Bugfixes in monthly_avg for masked data.