Fixed crash when pressing cancel on the number keyboard