bugfix: memory allocation error