typos fixes
bugfix on functions order in handler