APC and distribution fixes - Dev

Fixes #5227
Fixes #5231
#5229 already fixed on dev.