Changed the casting of getting an ID to return an integer instead of a long