Fixed wrong concatenation of not corresponding prefix and suffix - it is
really important to place local variables as close as possible to the
actual block, especially in recursive algos.