debug build fix
Merge pull request #623 from karme/experimental/modes

debug build fix, since 'type' variable was removed in earlier commit.