Getting ready for secured Amazon Cloudfront.
PHP warning fix and option saving trick for pk.