fixes #1
better length property check for last