Bug in type while using Date