Sorted out a couple of bugs with plugin loading