BUGFIX handle memory being 0