Fixed util.bounds
Improved tests