Pull request for #557