parsing logic errors