fix for validpositions