It't not clear to me why the <div> is needed.  But if it is, then does the else{} block also need the same change?