Fix bugs on partial mapping