update to fix various bugs