Fix calculateLD