fixed export command to make it possible to export non active environments