Fix implicit conversion

This fixes issue with never Clang with -Wall generating implicit conversion warnings.