fix capabilities and functions php