Simplify removal of trailing dash