Bug fix. Passes tests with Intel Fortran compiler.