fix and clean up stack instructions