fix some perl critic issues