fixed crashes because of stashed pieces in code