plugin order and some fixes