fixing length of undefined