Drawing in custom shader is half scaled

When drawing with a custom shader everything drawn in the shader is half scale… or drawing outside the shader everything id double scale…

If I call th of drawing function between shader calls the scale is what is expected!

cam.begin();
myCube.draw();  //This calls a custom shader and draws instanced cubes
ofSetColor(255, 0, 0);
ofDrawLine(0, 0, 0, myCube.ledSpacing * 15, 0, 0);
ofSetColor(0, 255, 0);
ofDrawLine(0, 0, 0, 0, myCube.ledSpacing, 0);
ofSetColor(0, 0, 255);
ofDrawLine(0, 0, 0, 0, 0, myCube.ledSpacing);
ofDrawArrow(ofVec3f(0, 0, 0), ofVec3f(0, 0, myCube.ledSpacing), 3);
cam.end();

In the screen grad the redline is suppose to be the same width as the cube…

file:///home/phil/Desktop/Screenshot%20from%202017-09-15%2021-54-23.png

More information I have added code to print the projection and model view matrix inside and outside the shader here are the result to my suprise they are the same!

Shader matrix m
model m
-0.71, -0.41, -0.58, 0.00
0.00, 0.82, -0.58, 0.00
0.71, -0.41, -0.58, 0.00
-0.00, -0.00, -259.81, 1.00
proj m
1.30, 0.00, 0.00, 0.00
0.00, 1.73, 0.00, 0.00
0.00, 0.00, -1.00, -1.00
0.00, 0.00, -10.40, 0.00
Outside Shader matrix m
model m
-0.71, -0.41, -0.58, 0.00
0.00, 0.82, -0.58, 0.00
0.71, -0.41, -0.58, 0.00
-0.00, -0.00, -259.81, 1.00
proj m
1.30, 0.00, 0.00, 0.00
0.00, 1.73, 0.00, 0.00
0.00, 0.00, -1.00, -1.00
0.00, 0.00, -10.40, 0.00

Edit: Please find included the vertex shader… I can’t find what is wrong with schaling, if I draw the lines in the shader the scaling is fine…

#version 150

in vec4 position; //The position of the drawn instanced mesh
uniform mat4 modelViewProjectionMatrix; //We know what this is
in vec3 cubePosition; //Uniform attrinbute buffer position vec3 p
in vec4 cubeColor; //Uniform attribute color
out vec4 colorVarying; //Output of color per instanced cube to frag shader

void main()
{
vec4 modifiedPos=position;
modifiedPos=position+vec4(cubePosition,1);
gl_Position = modelViewProjectionMatrix*(modifiedPos);
colorVarying=cubeColor;
}