fix overflow error caught by @zmaril