Remove unnecessary end