Add fix for bug discovered in Flatshare