BUG: Fixes for two minor bugs