Fix logic for questions script.