fixed many problems while testing events