fix bug in alloy comp, fix test