Fix pieces table filename seg fault issue