Niagara not rotating

Hello,

I recently switched particle system with niagara system. I just replaced the UParticleSystem with UNiagaraSystem and replaced the SpawnEmitterAtLocation with SpawnSystemAtLocation. Everything works fine except the Niagara effect rotation - the previous emitter rotation was set correctly, but when I use:

UNiagaraFunctionLibrary::SpawnSystemAtLocation(GetWorld(), MuzzleEffect, MuzzleLocation, MuzzleRotation , FVector(0.5, 0.5, 0.5));

The rotation and the scale get ignored, I tried many values. Why is it so? I tried setting Local space in emitter properties, but to no avail.