Fix bug with primitive types.