Fixing some bug encountered while creating a keyboard