fixed to support Safari