Fixed errors and updated semantic