Many fixes in many places, plus a broken fb+fbo mode