Version bump to 4.0.0-beta and also fix priority of options according to #465