Fix spell parsing logic