Fix unsigned overflow