A few small fixes following testing with S3