fixed parsing of packageMains options
more details in progress