added some missing exit-statements