fixed stroring data into db