Fixed design.js logic and IE issues