bug fix and added environment info