Revert "Bugs fixed"

This reverts commit b2022dde829d1d71480c70ed5bc1706fdec78842.