Fixed one part of getIntermediate