Fixing issue #291 (WIP)