Better bounds detection

Or I fixed a bug (i haven't found) or I created a new one.