Fix for TNL-1018.

Addresses https://openedx.atlassian.net/browse/TNL-1018