added bugtest branch, first atttempt at a fix for flag 256 issue
fixed small bug in final_fls