Tab and range bug fixes