Fix for changes in modes.js