Fix bug that prevented change of time