Improved afte/before render callbacks