added debug flag for widget manager, close #93