Included cx and cy in the try block

Included cx and cy in the try block