bug fix in previous 2 commits