fix a lot of motherfucking bugs