Fix issues that would've led to the execution of invalid instructions