fixed some error checking that hit a casting issue
fixed an issue where a function with no values triggered an assertion
formatting changes to ClamBCWriter.cpp