Fix active model adapter ajax error

Fix for #1359