Forgot the diagonal terms. Some derivatives are still wrong