add fix for issue 312