fix wrong functions names and correct corresponding html