Table updating works properly now