rpearce: Prevent key from being nil by using key passed in