#138: Fix incorrect returned ajax values

Resolves #138.