remove tabs when necessary