Bugfix for flickering - currentOffset was -1
Cleanup and bugfix