fixed an error of passing date values to model methods