fix rendering method