Add test for .length() and fix ohsostupid bug