Apply bounds in calculations (#818)