Bug1: arg.length() undefined fixed.  New Test case added