Made role id checks more strict