Fixed getaction bug for randomagent