loggin polish, sample counter bugfix