use delete instead of setting node to null on pop