fix perl errors