Fixed a bug with require.js