Correct fix for #1479 and finally fix compile issue from two recent commits.

- Closes #1482