Fixed last flag issue
Merge pull request #4 from tinganho/issue-3

Fixed last flag issue