Revert "Fixed some bugs"

This reverts commit 797d3b5c4850c0dafd98c57b1a4647ec5c5cd526.