Fix minor semantic issues