Added slice tests and bug fix for slice when passing wrong types