Correct concurrent code usage in Simulator.java

Signed-off-by: Gary Pamparà <gpampara@gmail.com>