properly cast integers in -C so that integer overflow doesnt occur

fixed a small error detection bug
version bump