Fixed bugs with random actions