fix bug: if currently no segments are presented, we should always append new segment
Merge branch 'devel' of github.com:kelvinh/xproxy into devel