fix some stuff... and add logging