update to current libs and fixing broken code.