fixed a couple of bl crashes when submitting sample data. misc fixes.