Fixing events layout bug