Revert "bug fixes"

This reverts commit dce05f28d97c283d67c343e4c7dedb60ff555ec4.
bug fixes