some fixes
some issues still need to be fixed but it will soon be finished