Fixed SQL error in database story reaper.