Various fixes

Yeah I cannot describe this sadly