PCAOptimum fix

This fixes a couple of issues with PCAOptimum and should also fix #10