convert longs to int in the models