Fix length not always returning TYPE_INT