Fixed replacing a non-object value directly