shell fixed so only runs 1x, rather than 2x