(Binary Simulator) Added code accidentally removed by commit 02f4b4495d1f802a27d246182a97c9d647c0eb7f