Fix start env detect