Minor bug fixes and dateTime test cases