fixed bug handling diffs

Change-Id: I8309995fbf5315daaa38a8ddb8deee6bfe775d36