Added compatibility for ie8