Fix several inconsistencies