bug fixes

LAtest updates and bug fixes