fix layout generator