bug fixed for primitive