fixed a success and failure issue