correction of minor bugs & mistakes