Fixed usage of len