bug fixes: stock queries2