more bug and stability fixes