Some fixes to environment profile