Fixed bson issue for 0.10.x
Fixed nan issue