Made LEN() a bit more robust