fix bug. getvalue function returned an element jquery when lenght = 0