Bug fixed in design mode

Design mode refactored