Fixed code inconsistencies