hacky fix to make it compatible with require.js