fix layout + reset function