fixed displacement bug