Remove needless end