Better mapping for integral types on serialize