Fixed NPE on size method