Better length validation