Fixed bug where empty is not defined
Only allow ajax requests to the data