fix the length methods