Improved a couple of error messages and checks for range overflows.