rewrite last fix

Now it affects only primitive types