fix warnings, check for cunit