Bug fixes.

Had lots of trouble with CInt.