Build without NDEBUG
Use the correct data type.  Closes #634