Fixed a bug in adding competence to plan