Big easy stepper driver - motor not changing direction.

Im using this sketch :
#include <AccelStepper.h>

// Define a stepper and the pins it will use
AccelStepper stepper(1, 9, 8 );

int pos = 3600;

void setup()
{
stepper.setMaxSpeed(3000);
stepper.setAcceleration(1000);
}

void loop()
{
if (stepper.distanceToGo() == 0)
{
delay(500);
pos = -pos;
stepper.moveTo(pos);
}
stepper.run();
}

Witch is suposed to make the motor go back and forth. But it runs the same way - pauses and go same direction.
I do have step and direction pins conectet to 8 and 9 on the arduino.