fixed bug with PENDING status on callback function