Fixed surface format bugs.