fixes #22, #19