array buffer fix