fix reverted bugs.