Bug fix #19, #21