Fixed getPage location handling