Some fixes for requirejs