fixed bug
fix bug when there is no record