fix function misuse