Removing unneeded end