Changing some math which helped fix a bug I had

I really don't think this covers all cases but it seemed to fix some issues I was seeing where self.bounds was huge and would cause bottom to become a large negative number. I suppose you could check for negatives here as well.