fixed roles nullpointer exception