Fixed settlement bug