Upper bounds for #227
Patch for #228