Fix conditions for result calculation and inspector spawning