fix jQuery related condition not to result true allways