Fixed missing env. Better handling of initial bbox.