Fixed Java trace bug