Improved behaviour when changing dimension