bug fix keypressed and black border