Fix problem with object creation after #1846