Fixed a bug where overlay wouldn't center on device