fixed the biggest bug