Constraint algebra in general relativity