resets database and fixes controller to check for previous data entries