fixed keyboard bugs