Fix for views and events, also fixed Pair model