fixed #46 + counter now works in source mode