Fixed crossing and xPos, yPos assigned to local variables.