fixed jQuery function targeting bug