Moved viewcat to last choice and old query illogic