Bug Fixes for zimcheck.cpp