Fix stack underflow bug

Missing or caused unwanted code to execute.