Fix some bugs in PicaEvent, and memory leak in poly view