Commiting some error fixes for previous state. Fixed counter increment
error