bug fix on functions definition + scalefunctiontype55