Fixing bugs in blast script