Tried to fix non-object property accessed