Fixed bug where centerline was not set correctly