Hi,
I think your problem is that the empty lines still contain whitespace (could happen if you do a lot copy/paste). If that`s the case a code box is generated.
"_" means whitespace in the following example:
__text preceded by two whitespaces will generate a code block
__
The last "empty" line will still generate a code block because of the two whitespace, you have to make sure that empty lines don`t contain any whitespace to avoid the generation of code boxes. If that doesn`t solve your problem you may file a bug with detailed information about your setup at the bugtracker mentioned by purplepaisley.