workaround for when ws-fed mw causes owin to cache an object in environment
Merge branch 'dev'
null checks on messageFunc