Fixed the failed specs and remove the warnning.