fix getting APP_HOSTNAME from environment