fix a new bug in bodystructure parsing. needs refactoring