fixed some hacks