Modify render button function