Merged fix from upstream/develop