fixed empty-rows-at-the-end-bug

Signed-off-by: TheTesla <stefan.helmert@gmx.net>