properly set bins
fixed 0ptr error when not making tree