Fix potential integer conversion problem