fix keyboard and bugs