Fixed various stuff /cc @Luegg