Move where the QRA is assigned
Fix bug
Add isset