fixed piece constructor bug