fixed bug in bounds computation