fix isLevelSelected to check for array. This should be cleaned up.