Fix STM allow removal bug