fixed alot of bugs