Fix error at post condition loop

This fixes #374.