Adding length check