Fixed bug in langevin thermostat