Fixes issues with Insert/Update buttons