fixed bug raised by previous commit regarding same issue