modify exit call