Fix for Redmine #2034