Fixed Ajax errors