fix the input map correctly