fixed some app widget error, added test for app widget