Fixed bug in surface binning