bug fixes: stock queries