Fix signedness conversion issue