misc bug fixes

* Fix compile error