Fixed some misc issue