Some fixes for the mapping