Apparently the integers in the database are really strings, so some typecasting needed to be done.