Reverted some changes

Certain bug still exists, hopefully will fix another time.