fix bug on empty old data