Fix deprecation warnings when running specs

Change-Id: I31a2e89f055a647d577c02c09b852f87d57bd7f1