Fixing semantic issues