Added script for inconsistency detection and fixing