fixed wrong usage and setting of functions adpater var