Fixed wrong memory allocations in int/long id update. Thanks to valgrind.