Fix unsigned / signed conversion