added some additional safety checks with regards to package settings.