fixing the bug from #1