fix many problems