fixed bug when no data has been previously entered