Pull request for issue 343