Fixed broken script and prevented deletion of database entries for now