Fixed bug found by @senthil10