Fix bugs in mbaas/environments update