Get rid of spec deprecation by making sure no error is raised