Fixed bug with crash when in pile that is being moved