fixed crash on long back press

The below change fixes the crash on long press on backspace key.
Got you. You are right. Updated the source as per your comment and it works :+1: