Bugfix: mw was uninitialized (= 0)