Added empty ray reg check ..