minor changes as a quick fix for requirejs local scope functions issue