Fixing Redundant Ajax Request