fixed 2 NPEs
fixed sqlexception for rename role