Closes issue #1636 & #1642