Bugs/1285

Fixed issue #1285.