problem with dates fixed

Merge active-record branch