fix cmp method for versions
addresses #228 and #225

revert changes in test