fix narrowing conversion (64bit builds)