fixed the problems it had