first run code fixes