fix crasher when target could not be converted to an object