Various inconsistency and fixes