fixed bug on line 244