got rid of the refreshing problem when deleting or changing