fix solution to problem 493