Fix overflow problem for widget