Fixed Error in the setPos Function.