Fix various stuff