Fixed wrong var name from randomDirectory to randomDirection