fix object type detection