Fix for Safari and IE10