fixing js bug for ie