bug fix for render