Removed render function
Fixed race condition on exit