hotfixed some bugs