fixed #218: dates not loading correctly in IE7 and IE8