Fix bugs: gesture divByZero; focus in new window