Madness - fix for lexical scope