Fix a bug in getDeplacement