fixed a bug with env detection on pagodabox