Fix a couple of bugs in dynamic RM

Change-Id: I6d5ba0c299d37f70ad220bfa6cd834740b12f298
Reviewed-on: http://gerrit.ent.cloudera.com:8080/1873
Reviewed-by: Henry Robinson <henry@cloudera.com>
Tested-by: jenkins