Handle single upper and single lower bounds and additional tests

Problem in previous pull request fixed.