Handle environment slightly better