fixed improper fit to bounds bug