Bugfix to time handling in the model.