fix function and variable type