Handle some ttyname cases with unitialized values