Fix/wp deletion

OP ticket: https://www.openproject.org/issues/2400