some events fixes. #pragma region's deleted.