Fixes for CPPAMP