(Contributed by Manikandan R via Daniel Templeton) (cherry picked from commit 4c40cd451cbdbce5d2b94ad0e7e3cc991c3439c5)