fixing line 494 bug