fixes all remaining bugs i can find