Range sensors, in particular time-of-flight and stereo cameras, are being increasingly used for applications such as robotics, automotive, human-machine interface and virtual reality. The ability to recover the geometrical structure of visible surfaces is critical for scene understanding. Typical structured indoor or urban scenes are often represented via compositional models comprising multiple planar surface patches. The RANSAC robust regression algorithm is the most popular technique to date for extracting individual planar patches from noisy data sets containing multiple surfaces. Unfortunately, RANSAC fails to produce reliable results in situations with two nearby patches of limited extent, where a single plane crossing through the two patches may contain more inliers than the "correct" models. This is the case of steps, curbs, or ramps, which represent the focus of our research for the impact they can have on cars' safe parking system or robot navigation. In an effort to improve the quality of regression in these cases, we propose a modification of the RANSAC algorithm, dubbed CC-RANSAC, that only considers the largest connected components of inliers to evaluate the fitness of a candidate plane. We provide experimental evidence that CC-RANSAC may recover the planar patches composing a typical step or ramp with substantially higher accuracy than the traditional RANSAC algorithm.