Fix for running in --check mode