fix some stuff to get it compileable