fixed several design bugs