Post JS-refactoring bugfix