the problem was that server context wasn't assigned to the site during the install hook that was ran, so I added a check to hardcode it if it's not found.