Revert "fixed bugs"

This reverts commit c2e2caeabfb53249bdd9ab1d2f308c5d3e3fd3bc.
fixed all bugs