fix cast id to integer