more fixes..still not successfully tested