Update element as needed
Fix bugs