bug fixes and delete all records