Fix minor bugs with similar definitions