Cleanup and small fix