Remove invalid instructions