Fixed date issues when querying server