set server flag when calling the role instead of using an extra variable.