Updated to support PCL 1.6+