Modified advancedblocks.js