Spawn actor on server

I am having and issue in custom event spawning in an actor and setting a variable(replicated) on mycontroller but when i get the variable after i call the custom even it is none but when it triggers again i get the first variable. Ie spawn actor A then get none, spawn actor B get Actor A on the second time. I don’t know why it is 1 actor late on the get.