Improve dotform handling