fix JS bug while dropping mapping elements