Fix variable names

change day.type to daytype