Resolving two bugs