Issue #31, #34, small fixes