Fixed the read XPs method