fixed bug with replacing a literal with an object