updated RM, removed issues when queryLambda=1