fixed nonsense bugs