Fix missing null-terminator in util functions
Add step argument to slice