Fixed assignment based on expressions.
Merge branch 'fix-exp-assignment' into develop

Fixes #241.