fixed mapping error window_id
remove unused code