Fix bug with standalone builds