Update fix problem with looping and else if error