Fixed exception for last child