Bug fixes (#91, #195)