Fixed card flip bug, added delegation in profileUI.js