Fix bugs that cause can search empty stock