Add volatile to be sure the JVM wont cache the value