fixed uninitialized counter
code review of glwidget, fixes some slice visualisation issues