Fix bug where port wouldn't set from env