Fixed centering issues with changing end point