FIX: getVIewRay for headless mode