resolve some issues with require.js