fix semantic issues