fix a bug on layout