trying to fix safari compatibility when rotating