fixed Encode64 & database connection