bugs found with qa.sh