Fix processing of --env option
Fix some issues in Item module