some hacks, some fixes