Fixed alot of bugs