#584 fixed issue with secureOnly=false
Merge pull request #585 from joola/feature/#584

#584 fixed issue with secureOnly=false