not canceling ended touches any longer
added check for framebuffer validity in debug mode