Adapted cc allocation functions to new error system