fix for issues with #310