Object with primitive value fix

Closes #398