Minor corrections to the code.