Check for upper bounds

should fix #3