fixed Stephan's bug in unit generation.