Reverted getLastNode method