removed overflow in maximum searches