Improved stability by fixing the crashes due to access to empty container front().
Merge pull request #9 from PIlin/fix_crashes_on_empty_container

Fixed the crashes from access to empty container