fix camera render function