Small fix on getDate