remove unnecessary exit function call