fix perl critic issues