Fixed error check for insertUserRole