WP management fix

Return correct status code