fixing bug returnType procedures