fixing overflow, enabling keypress, changing keyboard layout, checking states before first run