Fixes ajax call