Revert "Fix some bugs."

This reverts commit e17428108789ce07525d765c5e37ffb038ff689c.