Government on defensive over legislation targeting basic freedoms