fix setCenter method