Fixed : crashing due to pile creation