Made shared code compatible with PCL