Made change for #5148 suggested by @javanna