Fixed bug: keypresses worked over multiple frames