Fixes to lsf script