fixed consistency issues regarding ajax response