fixed problem with redirecting to index page when closing a goal