Fixed bug in getKindOfPosition(..)