Fix for issue #1479. Sorry for the delay.