added refresh to false in render to buffer when refreshed