solving prevent default keys problem