bugfix in dynamic.c