fixed minor bug in mapping algorithm and added one issue