Add specobjid retrieval
Fix query