fixed an issue with pieces having wrong pos value