Moar fixes

#2534
Not sure why it wants to merge my previous commits...