Solved some problems related to the primitives