Cleanup func fixes