Fix issue in javascript maps