fixed complete bugs