Fixed two inconsistencies with the type of variable "displacement"