Fixing #513