Feature/478 fix undefined is ajax constant

Fixes #478