Reproduce jquery_plugin bug in specs and fix it