fix missing var. remove unnecessary code
change decrementing counter to calling finish