correctly replace tabs with spaces