Wheey fixes + a few other bugs found while scanning the application log