fix spaghetti fixes