fix bug

fixed undefined x problem.