fix from #154 from vignus