a fix for .b0 ptx and some other code improvements