Fix plugin load path, Fix setting of primary key in rails 3+