fixed bug which occured while there was no record in database