Fix for off-by-one error and not checking for fake clients.