Both steppers moving same direction when commands given

I figured out where it came from it was my Arduino when x or y command given both x and y pins are giving out signals on stepper enable pin and steps pin but no problem with z axis .. but I tried flashing another program using same pins and it worked perfectly only having issues when using Grbl ! Is it a sign of Arduino damage ..?