Fixed a bug with TARGET environment variable.