Fixed readInt to readObject, should always use readObject regardless, and cast