fixes add exit at the end