corrected a few design bugs