Revert "misc fixes"

This reverts commit e171e28babb3ed39304aa40bf861c83d57602b31.