fix warning and test