handle error case a bit more friendly
cleanup