Fixed incorrect role checking call

Main code rev. 1873