Fixes escape code 2J behavior

Also fixes a race between clearCanvas() and binaryGet()