bug fix / enhancement Not working properly with encryption enabled #66