Small bug fix
Latest Changes and fixes for simulation