bugfixes and improvements for minor()