Fixed outof memory (length == -1)