Merge r2528 and r2529 from mapistore_v2 branch.