fix ray drawing