fixed exit, but there is another error