Fixed the bug found by Ramana Kumar