Fixed a compile error, x was not declared