Fixed non-object issue