Fixed date comparison and removed content encoding