made fixes, works with --nolesk flag