fixed #37, working on #16