fixed bug issue 40