Fixed update functions to work with changes in layout