bugfix buildUnit condition