fixed bug related to issue 3