Improved multiple formulae selection. Fixed issue #72.