This patch is a prerequisite for compiling the code with the warnings -Wconversion enabled. Issue #23