Fixing Gram-Schmidt