fix
fix various bugs