found bug in convert to arrays, also added check in validator