Stupid fixes and more logging