Fix last child when there's a limit and simplify code
Merge pull request #3 from mnoack/master

Fix last child when there's a limit and simplify code