Fix a few super critical issues in CupCake