Fix bug in deleting active record sessions