fixed some null pointer exceptions and localized date parsing