Fixed recv length bug