Fixed 'NaN' error in IE