remove trailing semicolons