Closes issue #1339 & #1340