Fixed how SMem queries are done.