bug fixes in mknlms demo
remove flag

can be moved to profiler function