nasty scope bugfix
final polish