Fixed some bugs with rendering widgets