Resolve test errors and warnings