replace obsolete functions regarding crypto:md5 AND fix to do shutdown properly