Fixed #1337
Changes related to #1336